package cn.ococci.dm.Main.Core;

import java.util.List;

import cn.ococci.dm.Main.Tools.ThreadTool;

/**
 * Created by cyan on 15/12/30.
 */
public class WhiteCommand implements CommandExecute{

    private SocketCommand doorCommand;


    private List<Integer> ids;

    public WhiteCommand(List<Integer> ids,SocketCommand doorCommand){
        this.doorCommand  = doorCommand;
        this.ids = ids;
    }

    @Override
    public void execute() {
        ThreadTool.runOnBgThread(new Runnable() {
            @Override
            public void run() {
                doorCommand.addWhiteBlackList(CommandType.COMMAND_ADD_WHITE,ids);
            }
        });
    }
}
